cc.Class({
    extends: cc.Component,

    properties: {
        loadingPop:cc.Node,
    },

    // use this for initialization
    onLoad: function () {
        let self = this;
        cc.game.addPersistRootNode(this.node);
        cc.game.addPersistRootNode(this.loadingPop);
        window.drawFlag = false;
        window.guideFlag = false;
        cc.director.on(cc.Director.EVENT_BEFORE_SCENE_LOADING, function () {
            self.loadingPop.active = true;
            self.loadingPop.getComponent('loading').start();
        });
        cc.director.on(cc.Director.EVENT_AFTER_SCENE_LAUNCH, function () {
            self.loadingPop.active = false;
            self.loadingPop.getComponent('loading').end();
        });
    },

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
